package com.example.layui.service;

import com.example.layui.mapper.ShopMapper;
import com.example.layui.pojo.Shop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {
    @Resource
    ShopMapper shopMapper;
    @Override
    public List<Shop> getAllShopByPage(int page, int limit) {
        int start = (page-1)*limit;
        int size = limit;
        return shopMapper.getAllShopByPage(start,size);
    }

    @Override
    public Shop getShopById(int id) {
        return shopMapper.getShopById(id);
    }
}
